<%= stylesheet_link_tag "contest" %>
<h3> Offline board for <%= link_to @contest.name, :action => "show", :id => @contest %> </h3>
<table class="list_table">
  <tr class="head">
    <td> <div> Place </div></td>
    <td> <div> User </div></td>
    <% @contest.problems.each_with_index do |p, i| %>
      <td> <div> <%= link_to ('A'[0]+i).chr, :controller => "problems", :action => "show", :id => p.id%> </div></td>
    <% end %> 
    <td> <div> Accepted </div></td>
    <td> <div> Penalty </div></td>
  </tr>
  <% user_array = make_user_array(@contest_users, @contest_runs, @contest)%>
    <% user_array.each_with_index do |u, i| %>
      <tr>
        <td> <%= i + 1%>. </td>
        <td> <%= link_to u[:user].login, :controller => "user", :action => "show", :id => u[:user].id%> </td>
        <% u[:problems].each do |p| %>
          <td> <%= p[0] %> <br/> <%= p[1] %></td>
        <% end %>
        <td> <%= u[:accepts] %> </td>
        <td> <%= u[:penalt] %>  </td>
      </tr>
    <%end%>
  </table>